// pages/reviewWeek/reviewWeek.js
import nami from '../../nami/index';
import utils from '../../utils/utils';
Page({

  /**
   * 页面的初始数据
   */
  data: {
    diary: [],
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 1000
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    nami.request({
      url: '/request/diary/showDiary.groovy',
      data: {
        week: new Date().format('yyyy-MM-dd')
      },
      success: function (res) {
        console.log('This week diary: ',res.data);
        that.setData({
          diary: res.data
        });
      }
  });
  }
})